<template>
  <div>
    <h1>Parent</h1>
    <div>
      <h2>1.父子组件双向绑定</h2>
      <Child :count="count" @update:count="count=$event"/>
    </div>
    <div>
      <h2>2.使用.sync修饰符父子组件双向绑定</h2>
      <Child :count.sync="count"/>
    </div>
  </div>
</template>

<script>
import Child from './Child.vue'
export default {
    name:'Parent',
    data() {
      return {
        count:0
      }
    },
    components:{
        Child
    }
}
</script>

<style>

</style>